
<div class="layui-row layui-col-space15 layui-form-item">
    <div class="layui-col-md12">
        <label for="L_title" class="layui-form-label">{{ $label??'标签' }}：</label>
        <div class="layui-input-block">
            <div class="tags" id="tags">
                <input type="text" name="{{ $name??'name' }}" id="inputTags" placeholder="{{ $placeholder??'回车生成标签' }}" autocomplete="off">
            </div>
         </div>
    </div>
</div>

@section('js')
@parent
<script>
    layui.config({
        base: '/asset/' //静态资源所在路径
        ,version:true
    }).extend({
        inputTags: 'lib/extend/inputTag/inputTags',
    }).use(['inputTags'],function(){
        var inputTags = layui.inputTags;
        inputTags.render({
            elem:'#inputTags',
            content: {!! json_encode($val??['标签'],true)  !!} ,
            aldaBtn: true,
            done: function(value){
                console.log(value)
            }
        })

    })
</script>
@endsection